<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Space Manager: cpCCSprite Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Space Manager
   &#160;<span id="projectnumber">0.2.0</span>
   </div>
   <div id="projectbrief">Objective-C wrapper around chipmunk</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.2 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('interfacecp_c_c_sprite.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Properties</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Macros</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Instance Methods</a> &#124;
<a href="#pub-static-methods">Class Methods</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classcp_c_c_sprite-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">cpCCSprite Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#import &lt;<a class="el" href="cp_c_c_sprite_8h_source.html">cpCCSprite.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for cpCCSprite:</div>
<div class="dyncontent">
 <div class="center">
  <img src="interfacecp_c_c_sprite.png" usemap="#cpCCSprite_map" alt=""/>
  <map id="cpCCSprite_map" name="cpCCSprite_map">
<area href="protocolcp_c_c_node_protocol-p.html" alt="&lt;cpCCNodeProtocol&gt;" shape="rect" coords="145,56,280,80"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Instance Methods</h2></td></tr>
<tr class="memitem:aa4c06c7e06349c7d266cf5a3c9a39695"><td class="memItemLeft" align="right" valign="top">(id)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interfacecp_c_c_sprite.html#aa4c06c7e06349c7d266cf5a3c9a39695">initWithFile:bodyName:spaceManager:</a></td></tr>
<tr class="separator:aa4c06c7e06349c7d266cf5a3c9a39695"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac1bd9484f5643fcc77fc8434bf2f1459"><td class="memItemLeft" align="right" valign="top">(id)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interfacecp_c_c_sprite.html#ac1bd9484f5643fcc77fc8434bf2f1459">initWithSpriteFrame:bodyName:spaceManager:</a></td></tr>
<tr class="separator:ac1bd9484f5643fcc77fc8434bf2f1459"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6dac1cf1f99c77cd266dd90c8bce8c39"><td class="memItemLeft" align="right" valign="top">(id)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interfacecp_c_c_sprite.html#a6dac1cf1f99c77cd266dd90c8bce8c39">initWithSpriteFrameName:bodyName:spaceManager:</a></td></tr>
<tr class="separator:a6dac1cf1f99c77cd266dd90c8bce8c39"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aadfc1a23a314ee582a721605036ff043"><td class="memItemLeft" align="right" valign="top">(id)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interfacecp_c_c_sprite.html#aadfc1a23a314ee582a721605036ff043">initWithBodyName:spaceManager:</a></td></tr>
<tr class="separator:aadfc1a23a314ee582a721605036ff043"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_protocolcp_c_c_node_protocol-p"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_protocolcp_c_c_node_protocol-p')"><img src="closed.png" alt="-"/>&#160;Instance Methods inherited from <a class="el" href="protocolcp_c_c_node_protocol-p.html">&lt;cpCCNodeProtocol&gt;</a></td></tr>
<tr class="memitem:a1a786cb21d273cac31c0a6cd18df79fc inherit pub_methods_protocolcp_c_c_node_protocol-p"><td class="memItemLeft" align="right" valign="top">(void)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="protocolcp_c_c_node_protocol-p.html#a1a786cb21d273cac31c0a6cd18df79fc">applyImpulse:</a></td></tr>
<tr class="separator:a1a786cb21d273cac31c0a6cd18df79fc inherit pub_methods_protocolcp_c_c_node_protocol-p"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a21337b4c211cdbde5cc69e21b12498 inherit pub_methods_protocolcp_c_c_node_protocol-p"><td class="memItemLeft" align="right" valign="top">(void)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="protocolcp_c_c_node_protocol-p.html#a7a21337b4c211cdbde5cc69e21b12498">applyImpulse:offset:</a></td></tr>
<tr class="separator:a7a21337b4c211cdbde5cc69e21b12498 inherit pub_methods_protocolcp_c_c_node_protocol-p"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1fe3a631bd5f54bd57a3362256ac1a84 inherit pub_methods_protocolcp_c_c_node_protocol-p"><td class="memItemLeft" align="right" valign="top">(void)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="protocolcp_c_c_node_protocol-p.html#a1fe3a631bd5f54bd57a3362256ac1a84">applyForce:</a></td></tr>
<tr class="separator:a1fe3a631bd5f54bd57a3362256ac1a84 inherit pub_methods_protocolcp_c_c_node_protocol-p"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a44a817875dcf5dad66155c71c9e4620d inherit pub_methods_protocolcp_c_c_node_protocol-p"><td class="memItemLeft" align="right" valign="top">(void)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="protocolcp_c_c_node_protocol-p.html#a44a817875dcf5dad66155c71c9e4620d">applyForce:offset:</a></td></tr>
<tr class="separator:a44a817875dcf5dad66155c71c9e4620d inherit pub_methods_protocolcp_c_c_node_protocol-p"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae7b2ab2618379f01b86b60bdb20b758d inherit pub_methods_protocolcp_c_c_node_protocol-p"><td class="memItemLeft" align="right" valign="top">(void)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="protocolcp_c_c_node_protocol-p.html#ae7b2ab2618379f01b86b60bdb20b758d">resetForces</a></td></tr>
<tr class="separator:ae7b2ab2618379f01b86b60bdb20b758d inherit pub_methods_protocolcp_c_c_node_protocol-p"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Class Methods</h2></td></tr>
<tr class="memitem:a67f9b1df338e7903993db8c8a5afa581"><td class="memItemLeft" align="right" valign="top">(id)&#160;</td><td class="memItemRight" valign="bottom">+ <a class="el" href="interfacecp_c_c_sprite.html#a67f9b1df338e7903993db8c8a5afa581">spriteWithFile:bodyName:spaceManager:</a></td></tr>
<tr class="separator:a67f9b1df338e7903993db8c8a5afa581"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a863fa5ef1fb4aafc87af1546237e3191"><td class="memItemLeft" align="right" valign="top">(id)&#160;</td><td class="memItemRight" valign="bottom">+ <a class="el" href="interfacecp_c_c_sprite.html#a863fa5ef1fb4aafc87af1546237e3191">spriteWithSpriteFrame:bodyName:spaceManager:</a></td></tr>
<tr class="separator:a863fa5ef1fb4aafc87af1546237e3191"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af46289c3645fcc4cc03ed9b90c20b308"><td class="memItemLeft" align="right" valign="top">(id)&#160;</td><td class="memItemRight" valign="bottom">+ <a class="el" href="interfacecp_c_c_sprite.html#af46289c3645fcc4cc03ed9b90c20b308">spriteWithSpriteFrameName:bodyName:spaceManager:</a></td></tr>
<tr class="separator:af46289c3645fcc4cc03ed9b90c20b308"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5e24b9633eb9d0885cee27ff081fe794"><td class="memItemLeft" align="right" valign="top">(id)&#160;</td><td class="memItemRight" valign="bottom">+ <a class="el" href="interfacecp_c_c_sprite.html#a5e24b9633eb9d0885cee27ff081fe794">spriteWithBodyName:spaceManager:</a></td></tr>
<tr class="separator:a5e24b9633eb9d0885cee27ff081fe794"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:aafa9677f62f817594c592617dd130f48"><td class="memItemLeft" align="right" valign="top"><a class="el" href="interfacecp_c_c_node_impl.html">cpCCNodeImpl</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfacecp_c_c_sprite.html#aafa9677f62f817594c592617dd130f48">_implementation</a></td></tr>
<tr class="separator:aafa9677f62f817594c592617dd130f48"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header properties_protocolcp_c_c_node_protocol-p"><td colspan="2" onclick="javascript:toggleInherit('properties_protocolcp_c_c_node_protocol-p')"><img src="closed.png" alt="-"/>&#160;Properties inherited from <a class="el" href="protocolcp_c_c_node_protocol-p.html">&lt;cpCCNodeProtocol&gt;</a></td></tr>
<tr class="memitem:a1a30cbc3b1e10bfd045324e304d32332 inherit properties_protocolcp_c_c_node_protocol-p"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="protocolcp_c_c_node_protocol-p.html#a1a30cbc3b1e10bfd045324e304d32332">ignoreRotation</a></td></tr>
<tr class="separator:a1a30cbc3b1e10bfd045324e304d32332 inherit properties_protocolcp_c_c_node_protocol-p"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae7a172a6d45da0e5e47245ac4100293d inherit properties_protocolcp_c_c_node_protocol-p"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="protocolcp_c_c_node_protocol-p.html#ae7a172a6d45da0e5e47245ac4100293d">autoFreeShapeAndBody</a></td></tr>
<tr class="separator:ae7a172a6d45da0e5e47245ac4100293d inherit properties_protocolcp_c_c_node_protocol-p"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a127e70d997e4eca25473a345613f455e inherit properties_protocolcp_c_c_node_protocol-p"><td class="memItemLeft" align="right" valign="top">cpFloat&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="protocolcp_c_c_node_protocol-p.html#a127e70d997e4eca25473a345613f455e">integrationDt</a></td></tr>
<tr class="separator:a127e70d997e4eca25473a345613f455e inherit properties_protocolcp_c_c_node_protocol-p"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a089acc343420f491eec83e624b853e55 inherit properties_protocolcp_c_c_node_protocol-p"><td class="memItemLeft" align="right" valign="top">cpShape *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="protocolcp_c_c_node_protocol-p.html#a089acc343420f491eec83e624b853e55">shape</a></td></tr>
<tr class="separator:a089acc343420f491eec83e624b853e55 inherit properties_protocolcp_c_c_node_protocol-p"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a41dde45e96c5fc62df084108b368ee3c inherit properties_protocolcp_c_c_node_protocol-p"><td class="memItemLeft" align="right" valign="top">NSArray *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="protocolcp_c_c_node_protocol-p.html#a41dde45e96c5fc62df084108b368ee3c">shapes</a></td></tr>
<tr class="separator:a41dde45e96c5fc62df084108b368ee3c inherit properties_protocolcp_c_c_node_protocol-p"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a82699ec9e5e4e233996dcce832b7a7ee inherit properties_protocolcp_c_c_node_protocol-p"><td class="memItemLeft" align="right" valign="top">cpBody *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="protocolcp_c_c_node_protocol-p.html#a82699ec9e5e4e233996dcce832b7a7ee">body</a></td></tr>
<tr class="separator:a82699ec9e5e4e233996dcce832b7a7ee inherit properties_protocolcp_c_c_node_protocol-p"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af0e8dcd9135bb0586d5738f2b7b81ba3 inherit properties_protocolcp_c_c_node_protocol-p"><td class="memItemLeft" align="right" valign="top"><a class="el" href="interface_space_manager.html">SpaceManager</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="protocolcp_c_c_node_protocol-p.html#af0e8dcd9135bb0586d5738f2b7b81ba3">spaceManager</a></td></tr>
<tr class="separator:af0e8dcd9135bb0586d5738f2b7b81ba3 inherit properties_protocolcp_c_c_node_protocol-p"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A Cocos2d CCSprite that conforms to the <a class="el" href="protocolcp_c_c_node_protocol-p.html">cpCCNodeProtocol</a> </p>
</div><h2 class="groupheader">Method Documentation</h2>
<a class="anchor" id="aadfc1a23a314ee582a721605036ff043"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (id) initWithBodyName: </td>
          <td></td>
          <td class="paramtype">(NSString *)&#160;</td>
          <td class="paramname"><em>bodyName</em></td>
        </tr>
        <tr>
          <td class="paramkey">spaceManager:</td>
          <td></td>
          <td class="paramtype">(<a class="el" href="interface_space_manager.html">SpaceManager</a> *)&#160;</td>
          <td class="paramname"><em>spaceManager</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Create a sprite with sprite frame name and body</p>
<p>This function uses the same name for the sprite frame and the body shape.</p>
<p>You can use this if you also use TexturePacker <a href="http://www.texturepacker.com">http://www.texturepacker.com</a> and activate "Trim sprite names". In this case the .png ending is removed from the sprite's name so that both the sprite and the body shape use the same name.</p>
<p>GCpShapeCache must be initialised before using this funciton.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">spriteFrameName</td><td>name of a sprite frame </td></tr>
    <tr><td class="paramname">bodyName</td><td>name of the body as defined in PhysicsEditor </td></tr>
    <tr><td class="paramname">spaceManager</td><td>spaceManager to add the body to</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="interfacecp_c_c_sprite.html">cpCCSprite</a> </dd></dl>

<p>Provided by category <a class="el" href="categorycp_c_c_sprite_07_physics_editor_08.html#aadfc1a23a314ee582a721605036ff043">cpCCSprite(PhysicsEditor)</a>.</p>

</div>
</div>
<a class="anchor" id="aa4c06c7e06349c7d266cf5a3c9a39695"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (id) initWithFile: </td>
          <td></td>
          <td class="paramtype">(NSString *)&#160;</td>
          <td class="paramname"><em>fileName</em></td>
        </tr>
        <tr>
          <td class="paramkey">bodyName:</td>
          <td></td>
          <td class="paramtype">(NSString *)&#160;</td>
          <td class="paramname"><em>bodyName</em></td>
        </tr>
        <tr>
          <td class="paramkey">spaceManager:</td>
          <td></td>
          <td class="paramtype">(<a class="el" href="interface_space_manager.html">SpaceManager</a> *)&#160;</td>
          <td class="paramname"><em>spaceManager</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Create a sprite with image file and body</p>
<p>GCpShapeCache must be initialised before using this funciton.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fileName</td><td>name of the file to load </td></tr>
    <tr><td class="paramname">bodyName</td><td>name of the body as defined in PhysicsEditor </td></tr>
    <tr><td class="paramname">spaceManager</td><td>spaceManager to add the body to</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="interfacecp_c_c_sprite.html">cpCCSprite</a> </dd></dl>

<p>Provided by category <a class="el" href="categorycp_c_c_sprite_07_physics_editor_08.html#aa4c06c7e06349c7d266cf5a3c9a39695">cpCCSprite(PhysicsEditor)</a>.</p>

</div>
</div>
<a class="anchor" id="ac1bd9484f5643fcc77fc8434bf2f1459"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (id) initWithSpriteFrame: </td>
          <td></td>
          <td class="paramtype">(CCSpriteFrame *)&#160;</td>
          <td class="paramname"><em>spriteFrame</em></td>
        </tr>
        <tr>
          <td class="paramkey">bodyName:</td>
          <td></td>
          <td class="paramtype">(NSString *)&#160;</td>
          <td class="paramname"><em>bodyName</em></td>
        </tr>
        <tr>
          <td class="paramkey">spaceManager:</td>
          <td></td>
          <td class="paramtype">(<a class="el" href="interface_space_manager.html">SpaceManager</a> *)&#160;</td>
          <td class="paramname"><em>spaceManager</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Create a sprite with sprite frame and body</p>
<p>GCpShapeCache must be initialised before using this funciton.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">spriteFrame</td><td>pointer to a sprite frame </td></tr>
    <tr><td class="paramname">bodyName</td><td>name of the body as defined in PhysicsEditor </td></tr>
    <tr><td class="paramname">spaceManager</td><td>spaceManager to add the body to</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="interfacecp_c_c_sprite.html">cpCCSprite</a> </dd></dl>

<p>Provided by category <a class="el" href="categorycp_c_c_sprite_07_physics_editor_08.html#ac1bd9484f5643fcc77fc8434bf2f1459">cpCCSprite(PhysicsEditor)</a>.</p>

</div>
</div>
<a class="anchor" id="a6dac1cf1f99c77cd266dd90c8bce8c39"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (id) initWithSpriteFrameName: </td>
          <td></td>
          <td class="paramtype">(NSString *)&#160;</td>
          <td class="paramname"><em>spriteFrameName</em></td>
        </tr>
        <tr>
          <td class="paramkey">bodyName:</td>
          <td></td>
          <td class="paramtype">(NSString *)&#160;</td>
          <td class="paramname"><em>bodyName</em></td>
        </tr>
        <tr>
          <td class="paramkey">spaceManager:</td>
          <td></td>
          <td class="paramtype">(<a class="el" href="interface_space_manager.html">SpaceManager</a> *)&#160;</td>
          <td class="paramname"><em>spaceManager</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Create a sprite with sprite frame name and body</p>
<p>GCpShapeCache must be initialised before using this funciton.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">spriteFrameName</td><td>name of a sprite frame </td></tr>
    <tr><td class="paramname">bodyName</td><td>name of the body as defined in PhysicsEditor </td></tr>
    <tr><td class="paramname">spaceManager</td><td>spaceManager to add the body to</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="interfacecp_c_c_sprite.html">cpCCSprite</a> </dd></dl>

<p>Provided by category <a class="el" href="categorycp_c_c_sprite_07_physics_editor_08.html#a6dac1cf1f99c77cd266dd90c8bce8c39">cpCCSprite(PhysicsEditor)</a>.</p>

</div>
</div>
<a class="anchor" id="a5e24b9633eb9d0885cee27ff081fe794"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">+ (id) spriteWithBodyName: </td>
          <td></td>
          <td class="paramtype">(NSString *)&#160;</td>
          <td class="paramname"><em>bodyName</em></td>
        </tr>
        <tr>
          <td class="paramkey">spaceManager:</td>
          <td></td>
          <td class="paramtype">(<a class="el" href="interface_space_manager.html">SpaceManager</a> *)&#160;</td>
          <td class="paramname"><em>spaceManager</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Create a sprite with sprite frame name and body</p>
<p>This function uses the same name for the sprite frame and the body shape.</p>
<p>You can use this if you also use TexturePacker <a href="http://www.texturepacker.com">http://www.texturepacker.com</a> and activate "Trim sprite names". In this case the .png ending is removed from the sprite's name so that both the sprite and the body shape use the same name.</p>
<p>GCpShapeCache must be initialised before using this funciton.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">spriteFrameName</td><td>name of a sprite frame </td></tr>
    <tr><td class="paramname">bodyName</td><td>name of the body as defined in PhysicsEditor </td></tr>
    <tr><td class="paramname">spaceManager</td><td>spaceManager to add the body to</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="interfacecp_c_c_sprite.html">cpCCSprite</a> </dd></dl>

<p>Provided by category <a class="el" href="categorycp_c_c_sprite_07_physics_editor_08.html#a5e24b9633eb9d0885cee27ff081fe794">cpCCSprite(PhysicsEditor)</a>.</p>

</div>
</div>
<a class="anchor" id="a67f9b1df338e7903993db8c8a5afa581"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">+ (id) spriteWithFile: </td>
          <td></td>
          <td class="paramtype">(NSString *)&#160;</td>
          <td class="paramname"><em>file</em></td>
        </tr>
        <tr>
          <td class="paramkey">bodyName:</td>
          <td></td>
          <td class="paramtype">(NSString *)&#160;</td>
          <td class="paramname"><em>bodyName</em></td>
        </tr>
        <tr>
          <td class="paramkey">spaceManager:</td>
          <td></td>
          <td class="paramtype">(<a class="el" href="interface_space_manager.html">SpaceManager</a> *)&#160;</td>
          <td class="paramname"><em>spaceManager</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Create a sprite with image file and body</p>
<p>GCpShapeCache must be initialised before using this funciton.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fileName</td><td>name of the file to load </td></tr>
    <tr><td class="paramname">bodyName</td><td>name of the body as defined in PhysicsEditor </td></tr>
    <tr><td class="paramname">spaceManager</td><td>spaceManager to add the body to</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="interfacecp_c_c_sprite.html">cpCCSprite</a> </dd></dl>

<p>Provided by category <a class="el" href="categorycp_c_c_sprite_07_physics_editor_08.html#a67f9b1df338e7903993db8c8a5afa581">cpCCSprite(PhysicsEditor)</a>.</p>

</div>
</div>
<a class="anchor" id="a863fa5ef1fb4aafc87af1546237e3191"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">+ (id) spriteWithSpriteFrame: </td>
          <td></td>
          <td class="paramtype">(CCSpriteFrame *)&#160;</td>
          <td class="paramname"><em>spriteFrame</em></td>
        </tr>
        <tr>
          <td class="paramkey">bodyName:</td>
          <td></td>
          <td class="paramtype">(NSString *)&#160;</td>
          <td class="paramname"><em>bodyName</em></td>
        </tr>
        <tr>
          <td class="paramkey">spaceManager:</td>
          <td></td>
          <td class="paramtype">(<a class="el" href="interface_space_manager.html">SpaceManager</a> *)&#160;</td>
          <td class="paramname"><em>spaceManager</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Create a sprite with sprite frame and body</p>
<p>GCpShapeCache must be initialised before using this funciton.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">spriteFrame</td><td>pointer to a sprite frame </td></tr>
    <tr><td class="paramname">bodyName</td><td>name of the body as defined in PhysicsEditor </td></tr>
    <tr><td class="paramname">spaceManager</td><td>spaceManager to add the body to</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="interfacecp_c_c_sprite.html">cpCCSprite</a> </dd></dl>

<p>Provided by category <a class="el" href="categorycp_c_c_sprite_07_physics_editor_08.html#a863fa5ef1fb4aafc87af1546237e3191">cpCCSprite(PhysicsEditor)</a>.</p>

</div>
</div>
<a class="anchor" id="af46289c3645fcc4cc03ed9b90c20b308"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">+ (id) spriteWithSpriteFrameName: </td>
          <td></td>
          <td class="paramtype">(NSString *)&#160;</td>
          <td class="paramname"><em>spriteFrameName</em></td>
        </tr>
        <tr>
          <td class="paramkey">bodyName:</td>
          <td></td>
          <td class="paramtype">(NSString *)&#160;</td>
          <td class="paramname"><em>bodyName</em></td>
        </tr>
        <tr>
          <td class="paramkey">spaceManager:</td>
          <td></td>
          <td class="paramtype">(<a class="el" href="interface_space_manager.html">SpaceManager</a> *)&#160;</td>
          <td class="paramname"><em>spaceManager</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Create a sprite with sprite frame name and body</p>
<p>GCpShapeCache must be initialised before using this funciton.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">spriteFrameName</td><td>name of a sprite frame </td></tr>
    <tr><td class="paramname">bodyName</td><td>name of the body as defined in PhysicsEditor </td></tr>
    <tr><td class="paramname">spaceManager</td><td>spaceManager to add the body to</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="interfacecp_c_c_sprite.html">cpCCSprite</a> </dd></dl>

<p>Provided by category <a class="el" href="categorycp_c_c_sprite_07_physics_editor_08.html#af46289c3645fcc4cc03ed9b90c20b308">cpCCSprite(PhysicsEditor)</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="aafa9677f62f817594c592617dd130f48"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">- (<a class="el" href="interfacecp_c_c_node_impl.html">cpCCNodeImpl</a>*) _implementation</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>src/ccExtras/<a class="el" href="cp_c_c_sprite_8h_source.html">cpCCSprite.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="interfacecp_c_c_sprite.html">cpCCSprite</a></li>
    <li class="footer">Generated on Sun Sep 16 2012 13:09:50 for Space Manager by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.2 </li>
  </ul>
</div>
</body>
</html>
